Skip to main content

Incident Push

Register a callback, you will receive incident alarm in real time.

To register a callback, you just need provide two things.

Firstly, the language you'd like. IETF BCP 47 standard: {language}-{region}. For example: en-US.

Secondly and lastly, the callback. The callback contains url and appId which is for authentication. The url like https://{{host}}/xx/xx. The appId like "24416c36-d9c7-4d74-a047-d6ca461fxxxx". In addition, the http method should be post.

Then your callback will be invoked immediately when an incident occurs.

Demo curl:

curl -X POST "{{host}}" \
-H "accept: */*" \
-H "Content-Type: application/json" \
-d '{
  "appId": "{{appId}}",
  "payload": {
    "content": {
      "endTime": "",
      "incidentCode": "1011",
      "incidentId": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "incidentLevel": "H2",
      "incidentName": "Clean water full",
      "incidentStatus": 1,
      "startTime": "2023-01-14T02:09:28Z",
      "taskId": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "subTaskId": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "taskInstanceId": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "taskName": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "mapId": "74bbc189-3313-4665-8204-9fbe45dfxxxx",
      "mapName": "74bbc189-3313-4665-8204-9fbe45dfxxxx"
    },
    "modelTypeCode": "Scrubber 50H",
    "serialNumber": "ITEST00-0000-000-XXXX"
  }
}'

Parameter description:

field namefield typefiled descriptionexample
appIdStringfor authentication"24416c36-d9c7-4d74-a047-d6ca461fxxxx"
payloadObjectincident message content
payload.serialNumberStringrobot serial number"TEST00-0000-000-XXXX"
payload.modelTypeCodeStringrobot model type code"Scrubber 50H"
payload.contentObjectincident content
payload.content.incidentCodeStringincident code"1011"
payload.content.incidentNameStringincident name"Clean water full"
payload.content.incidentLevelStringincident level"H2"
payload.content.incidentIdStringincident id"c084a905-597e-4085-90dd-ecab697dxxxx"
payload.content.incidentStatusintincident status,1 alarm,0 recover1
payload.content.startTimeStringincident start time. utc time zone"2023-01-14T02:09:28Z"
payload.content.endTimeStringIncident end time,utc time zone. If the incident does not recover, end time is empty string"2023-01-14T02:09:28Z" or ""
payload.content.taskIdStringThe id of the task the robot is executing when the incident occurs."c084a905-597e-4085-90dd-ecab697dxxxx"
payload.content.subTaskIdStringThe id of the subtaskid the robot is executing when the incident occurs."c084a905-597e-4085-90dd-ecab697dxxxx"
payload.content.taskInstanceIdStringThe instance id of the task when the incident occurs."c084a905-597e-4085-90dd-ecab697dxxxx"
payload.content.taskNameStringThe name of the task when the incident occurs."task1"
payload.content.mapIdStringThe id of the map where the robot is located when the incident occurs."c084a905-597e-4085-90dd-ecab697dxxxx"
payload.content.mapNameStringThe name of the map where the robot is located when the incident occurs."map1"

payload.content.incidentLevel:

valuenamedescription
H0eventIt is not an alarm, but only an event notification
H1statusBuried point statistics
H2statusThe routine state of the robot can be solved by the user without any guidance
H3warnIt does not affect the robot task. Users can solve
H4assistance, problemIt does affect the robot task. Users can solve
H5hidden dangerIt does not affect the robot task. Users can not solve
H6faultIt does affect the robot task. Users can not solve
H7quality issuesSerious failure